import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

const a = Router.prototype.push;

Router.prototype.push =function push(location) {
return a.call(this, location).catch(err => err);
}


export default new Router({
    routes: [{
            path: '/',
            redirect: '/dashboard'
        },
        {
            path: '/',
            component: () =>
                import ( /* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/dashboard',
                    component: () =>
                        import ( /* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '系统首页' }
                }, {
                    path: '/getMessages',
                    component: () =>
                        import ( /* webpackChunkName: "messages" */ '../components/page/message/messages.vue'),
                    meta: { title: '消息查询' }
                },
                {
                    path: '/addMessage',
                    component: () =>
                        import ( /* webpackChunkName: "addMessage" */ '../components/page/message/addMessage.vue'),
                    meta: { title: '发送消息' }
                },
                {
                    path: '/getMessage',
                    component: () =>
                        import ( /* webpackChunkName: "message" */ '../components/page/message/message.vue'),
                    meta: { title: '消息详情' }
                },
                {
                    path: '/updateMessage',
                    component: () =>
                        import ( /* webpackChunkName: "updateMessage" */ '../components/page/message/updateMessage.vue'),
                    meta: { title: '更新消息' }
                },{
                    path: '/mymessage',
                    component: () =>
                        import ( /* webpackChunkName: "leaves" */ '../components/page/message/myMsg.vue'),
                    meta: { title: '个人消息' }
                }, {
                    path: '/getLeaves',
                    component: () =>
                        import ( /* webpackChunkName: "leaves" */ '../components/page/message/leaves.vue'),
                    meta: { title: '假条查询' }
                },
                {
                    path: '/addLeave',
                    component: () =>
                        import ( /* webpackChunkName: "addLeave" */ '../components/page/message/addLeave.vue'),
                    meta: { title: '添加假条' }
                },
                {
                    path: '/getLeave',
                    component: () =>
                        import ( /* webpackChunkName: "leave" */ '../components/page/message/leave.vue'),
                    meta: { title: '假条详情' }
                },
                {
                    path: '/updateLeave',
                    component: () =>
                        import ( /* webpackChunkName: "updateLeave" */ '../components/page/message/updateLeave.vue'),
                    meta: { title: '更新假条' }
                },{
                    path: '/getSalarys',
                    component: () =>
                        import ( /* webpackChunkName: "salarys" */ '../components/page/paramAndSalary/salary/salarys.vue'),
                    meta: { title: '工资查询' }
                },
                {
                    path: '/getSalary',
                    component: () =>
                        import ( /* webpackChunkName: "salary" */ '../components/page/paramAndSalary/salary/salary.vue'),
                    meta: { title: '工资详情' }
                },
                {
                    path: '/updateSalary',
                    component: () =>
                        import ( /* webpackChunkName: "updateSalary" */ '../components/page/paramAndSalary/salary/updateSalary.vue'),
                    meta: { title: '更新工资' }
                },{
                    path: '/getParams',
                    component: () =>
                        import ( /* webpackChunkName: "params" */ '../components/page/paramAndSalary/param/params.vue'),
                    meta: { title: '参数查询' }
                },
                {
                    path: '/getParam',
                    component: () =>
                        import ( /* webpackChunkName: "param" */ '../components/page/paramAndSalary/param/param.vue'),
                    meta: { title: '参数详情' }
                },
                {
                    path: '/updateParam',
                    component: () =>
                        import ( /* webpackChunkName: "updateParam" */ '../components/page/paramAndSalary/param/updateParam.vue'),
                    meta: { title: '更新参数' }
                },{
                    path: '/getHolidays',
                    component: () =>
                        import ( /* webpackChunkName: "pers" */ '../components/page/holiday/holidays.vue'),
                    meta: { title: '假期查询' }
                },
                {
                    path: '/getHoliday',
                    component: () =>
                        import ( /* webpackChunkName: "dept" */ '../components/page/holiday/holiday.vue'),
                    meta: { title: '假期详情' }
                },
                {
                    path: '/updateHoliday',
                    component: () =>
                        import ( /* webpackChunkName: "depts" */ '../components/page/holiday/updateHoliday.vue'),
                    meta: { title: '更新假期' }
                }, {
                    path: '/getChecks',
                    component: () =>
                        import ( /* webpackChunkName: "pers" */ '../components/page/check/checks.vue'),
                    meta: { title: '考勤查询' }
                },
                {
                    path: '/getCheck',
                    component: () =>
                        import ( /* webpackChunkName: "check" */ '../components/page/check/check.vue'),
                    meta: { title: '考勤详情' }
                },
                {
                    path: '/times',
                    component: () =>
                        import ( /* webpackChunkName: "check" */ '../components/page/check/time.vue'),
                    meta: { title: '定时时间' }
                },
                {
                    path: '/updateCheck',
                    component: () =>
                        import ( /* webpackChunkName: "updateCheck" */ '../components/page/check/updateCheck.vue'),
                    meta: { title: '更新考勤' }
                }, {
                    path: '/getMenus',
                    component: () =>
                        import ( /* webpackChunkName: "menus" */ '../components/page/rAndp/menu/menus.vue'),
                    meta: { title: '菜单查询' }
                },
                {
                    path: '/getMenu',
                    component: () =>
                        import ( /* webpackChunkName: "menu" */ '../components/page/rAndp/menu/menu.vue'),
                    meta: { title: '菜单详情' }
                },
                {
                    path: '/updateMenu',
                    component: () =>
                        import ( /* webpackChunkName: "updateMenu" */ '../components/page/rAndp/menu/updateMenu.vue'),
                    meta: { title: '更新菜单' }
                },{
                    path: '/getPermissions',
                    component: () =>
                        import ( /* webpackChunkName: "pers" */ '../components/page/rAndp/permission/pers.vue'),
                    meta: { title: '权限查询' }
                },
                {
                    path: '/getPermission',
                    component: () =>
                        import ( /* webpackChunkName: "dept" */ '../components/page/rAndp/permission/per.vue'),
                    meta: { title: '权限详情' }
                },
                {
                    path: '/updatePermission',
                    component: () =>
                        import ( /* webpackChunkName: "depts" */ '../components/page/rAndp/permission/updatePer.vue'),
                    meta: { title: '更新权限' }
                },
                {
                    path: '/getRoles',
                    component: () =>
                        import ( /* webpackChunkName: "depts" */ '../components/page/rAndp/role/roles.vue'),
                    meta: { title: '角色查询' }
                },
                {
                    path: '/addRole',
                    component: () =>
                        import ( /* webpackChunkName: "addDept" */ '../components/page/rAndp/role/addRole.vue'),
                    meta: { title: '添加角色' }
                },
                {
                    path: '/getRole',
                    component: () =>
                        import ( /* webpackChunkName: "user" */ '../components/page/rAndp/role/role.vue'),
                    meta: { title: '角色详情' }
                },
                {
                    path: '/assign',
                    component: () =>
                        import ( /* webpackChunkName: "user" */ '../components/page/rAndp/assign.vue'),
                    meta: { title: '权限分配' }
                },
                {
                    path: '/updateRole',
                    component: () =>
                        import ( /* webpackChunkName: "updateUser" */ '../components/page/rAndp/role/updateRole.vue'),
                    meta: { title: '更新角色' }
                },
                {
                    path: '/getUsers',
                    component: () =>
                        import ( /* webpackChunkName: "depts" */ '../components/page/user/users'),
                    meta: { title: '用户查询' }
                },
                {
                    path: '/addUser',
                    component: () =>
                        import ( /* webpackChunkName: "addDept" */ '../components/page/user/addUser.vue'),
                    meta: { title: '添加用户' }
                },
                {
                    path: '/getUser',
                    component: () =>
                        import ( /* webpackChunkName: "dept" */ '../components/page/user/user.vue'),
                    meta: { title: '用户详情' }
                },
                {
                    path: '/self',
                    component: () =>
                        import ( /* webpackChunkName: "dept" */ '../components/page/user/self.vue'),
                    meta: { title: '个人详情' }
                },
                {
                    path: '/updateUser',
                    component: () =>
                        import ( /* webpackChunkName: "updateUser" */ '../components/page/user/updateUser.vue'),
                    meta: { title: '更新用户' }
                },
                {
                    path: '/getDepts',
                    component: () =>
                        import ( /* webpackChunkName: "depts" */ '../components/page/dept/depts'),
                    meta: { title: '部门查询' }
                },
                {
                    path: '/addDept',
                    component: () =>
                        import ( /* webpackChunkName: "addDept" */ '../components/page/dept/addDept.vue'),
                    meta: { title: '添加部门' }
                },
                {
                    path: '/getDept',
                    component: () =>
                        import ( /* webpackChunkName: "dept" */ '../components/page/dept/dept.vue'),
                    meta: { title: '部门详情' }
                },
                {
                    path: '/updateDept',
                    component: () =>
                        import ( /* webpackChunkName: "updateDept" */ '../components/page/dept/updateDept.vue'),
                    meta: { title: '部门编辑' }
                }, {
                    path: '/getEmployees',
                    component: () =>
                        import ( /* webpackChunkName: "employees" */ '../components/page/employee/employees.vue'),
                    meta: { title: '员工查询' }
                },
                {
                    path: '/addEmployee',
                    component: () =>
                        import ( /* webpackChunkName: "addEmployee" */ '../components/page/employee/addEmployee.vue'),
                    meta: { title: '添加员工' }
                },
                {
                    path: '/getEmployee',
                    component: () =>
                        import ( /* webpackChunkName: "employee" */ '../components/page/employee/employee.vue'),
                    meta: { title: '员工详情' }
                },
                {
                    path: '/updateEmployee',
                    component: () =>
                        import ( /* webpackChunkName: "updateEmployee" */ '../components/page/employee/updateEmployee.vue'),
                    meta: { title: '员工编辑' }
                },
                {
                    path: '/getPositions',
                    component: () =>
                        import ( /* webpackChunkName: "positions" */ '../components/page/position/positions'),
                    meta: { title: '员工查询' }
                },
                {
                    path: '/addPosition',
                    component: () =>
                        import ( /* webpackChunkName: "addPosition" */ '../components/page/position/addPosition.vue'),
                    meta: { title: '添加职位' }
                },
                {
                    path: '/getPosition',
                    component: () =>
                        import ( /* webpackChunkName: "position" */ '../components/page/position/position.vue'),
                    meta: { title: '职位详情' }
                },
                {
                    path: '/updatePosition',
                    component: () =>
                        import ( /* webpackChunkName: "updatePosition" */ '../components/page/position/updatePosition.vue'),
                    meta: { title: '职位编辑' }
                },
                
                {
                    path: '/404',
                    component: () =>
                        import ( /* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () =>
                        import ( /* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                }
               
            ]
        },
        {
            path: '/login',
            component: () =>
                import ( /* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});